// 获取cookie
var username = tool.getCookie('username')
if(username){
    $('.logininfo').html(`
        <a>欢迎<span style="font-size:20px;color:white;"> ${username}</span> 的到来！<a>
        <a><span class="logout">退出</span></a>
    `)
    // 退出
    $('.logout').click(function(){
        tool.removeCookie('username')
        $('.logininfo').html(`
            <a href="../html/login.html">登录</a>
            <a href="../html/register.html">注册</a>
            <a href="">消息通知</a>
        `)
    })
}